<?php
/**
 * $Id: response.php 12 2010-11-28 20:02:53Z LEON $
 * $Author: LEON $
 * $LastChangedDate: 2010-11-28 20:02:53 +0000 (Sun, 28 Nov 2010) $
 * $Revision: 12 $
 */
namespace cmFly\system;
class response {
    protected $headers=Array();
    public function header($header,$response_code=NULL) {
	$this->headers[]=Array('header'=>$header,'code'=>$response_code);
    }
    public function send_headers() {
	while(count($this->headers)) {
	    $arr=array_shift($this->headers);
	    if(!$arr['code']) {
		header($arr['header'],1);
		continue;
	    }
	    header($arr['header'],1,$arr['code']);
	}
    }
}